package com.dingup.homework.service;

import com.alibaba.fastjson.JSONArray;
import com.dingup.homework.bean.DO.HwSsatWordRecordDO;

import java.util.List;

/**
 * @author jun 2018/11/12.
 */
public interface HwSsatWordRecordService {
    /**
     * 添加记录
     *
     * @param hwSsatWordRecordDO HwSsatWordRecordDO
     * @return Boolean
     */
    Boolean add(HwSsatWordRecordDO hwSsatWordRecordDO);

    /**
     * 更新答案
     *
     * @param id         Integer
     * @param statResult String
     * @param correctNum Integer
     * @param totalNum   Integer
     * @param answerData JSONArray
     * @return Boolean
     */
    Boolean updateAnswerData(Integer id, String statResult, Integer correctNum, Integer totalNum, JSONArray answerData);

    /**
     * 根据作业信息获取数据
     *
     * @param userId              String
     * @param homeworkRecordId    Integer
     * @param homeworkQuestionNum Integer
     * @return HwSsatWordRecordDO
     */
    HwSsatWordRecordDO getByHomeworkInfo(String userId, Integer homeworkRecordId, Integer homeworkQuestionNum);

    /**
     * 根据作业记录id获取数据列表
     *
     * @param homeworkRecordId Integer
     * @return List<HwSsatWordRecordDO>
     */
    List<HwSsatWordRecordDO> listByHomeworkRecordId(Integer homeworkRecordId);
}
